#pragma once
#include <memory>
#include "qqmessage.grpc.pb.h"
#include "MessageEngine.h"

namespace kq{

class EmulatorImpl : public qq::message::Emulator::Service//, public std::enable_shared_from_this<EmulatorImpl>
{
public:
	EmulatorImpl(MessageEngine& messageEngine);
	virtual ~EmulatorImpl();

	virtual ::grpc::Status privateMsg(::grpc::ServerContext* context, const ::qq::message::EmulatorPrivateMsg* request, ::qq::message::Gvoid* response);
	virtual ::grpc::Status groupMsg(::grpc::ServerContext* context, const ::qq::message::EmulatorGroupMsg* request, ::qq::message::Gvoid* response);
	virtual ::grpc::Status discussMsg(::grpc::ServerContext* context, const ::qq::message::EmulatorDiscussMsg* request, ::qq::message::Gvoid* response);
	virtual ::grpc::Status getLoginQQ(::grpc::ServerContext* context, const ::qq::message::Gvoid* request, ::qq::message::Gint64* response);
	virtual ::grpc::Status getLoginNick(::grpc::ServerContext* context, const ::qq::message::Gvoid* request, ::qq::message::Gstring* response);
protected:

	MessageEngine& messageEngine_;

};

}